<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>原点区划</title>
    <link rel="stylesheet" href="../../assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="../../assets/module/dtree/dtree.css"/>
    <link rel="stylesheet" href="../../assets/module/dtree/font/dtreefont.css"/>
    <link rel="stylesheet" href="../../assets/module/admin.css?v=313"/>
    <link rel="stylesheet" href="../../assets/css/publicStyle.css"/>
    <!--[if lt IE 9]>
    <script src="../../assets/libs/html5shiv.min.js"></script>
    <script src="../../assets/libs/respond.min.js"></script>
    <![endif]-->
    <style>
        .layui-form-select .layui-edge{
            left: 158px;
        }
        #RegionTree{
            height: 136px;
            overflow: auto;
            border: 1px solid #ddd;
            border-radius: 0 3px 3px 0;
            width: 200px;
            z-index: 100;
            background: #fff;
            display: none;
        }
        .importIdentValueModel{
            margin: 20px;
        }
        .importIdentValueModel p {
            font-size: 12px;
            color: #000000a1;
            float: left;
            margin: 14px 0 0 5px;
        }
        #file-btn-upload{
            float: left;
        }
        #regionForm .layui-form-label{
            width: 115px;
        }
        #regionForm .text-right{
            margin: 30px 0;
        }
    </style>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-form toolbar">
                <div class="layui-card-header">
                    原点区划管理
                </div>
                <div class="layui-card-body mini-bar" >
                    <div id="orgionRegion-tmpl-box"></div>
                    <table id="regionManageTreeTable" style="width:100%;height:400px"></table>
                </div>
            </div>

        </div>
    </div>
</div>
<!--新增||修改弹窗-->
<script type="text/html" id="addRegionManage">
    <form id="regionForm" lay-filter="regionForm" class="layui-form model-form">
        <div class="layui-form-item">
            <label class="layui-form-label">区划名称</label>
            <div class="layui-input-block">
                <input name="name" placeholder="请输入区划名称" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" lay-verify="required"  />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">区划简称</label>
            <div class="layui-input-block">
                <input name="shortName" placeholder="请输入区划简称" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" lay-verify=""  />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">区划编码</label>
            <div class="layui-input-block">
                <input name="code" placeholder="请输入区划编码" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" lay-verify=""  />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">上级区划</label>
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-primary" type="button" id="parentRegionName" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</button>
                <ul id="RegionTree" class="ztree" ></ul>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">x坐标</label>
            <div class="layui-input-block">
                <input name="x" placeholder="请输入x坐标" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips"  />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">y坐标</label>
            <div class="layui-input-block">
                <input name="y" placeholder="请输入y坐标" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">城乡分类代码</label>
            <div class="layui-input-block">
                <input name="urcCode" placeholder="请输入城乡分类代码" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">乡属性代码</label>
            <div class="layui-input-block">
                <input name="ruralProperty" placeholder="请输入乡属性代码" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips"  />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">村属性代码</label>
            <div class="layui-input-block">
                <input name="villageProperty" placeholder="请输入村属性代码" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">行政区划类型</label>
            <div class="layui-input-block">
                <select name="regionCodeType" lay-filter="">
                    <option value="1">普通区划</option>
                    <option value="2">高新区</option>
                    <option value="3">特色区划</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">描述</label>
            <div class="layui-input-block">
                <textarea name="memo" placeholder="请输入描述信息" class="layui-textarea" maxlength="20"
                          lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closePageDialog">取消</button>
            <button class="layui-btn" lay-filter="regionEditSubmit" lay-submit>确定</button>
        </div>
    </form>
</script>
<!--渲染原点区划管理权限-->
<script type="text/tmpl" id="orgionRegion-tmpl">
    <div class="layui-form toolbar">
        <div class="layui-form-item">
            <div class="layui-inline">
                {{ if hasPower("/region/orgion:add")}}
                <button class="layui-btn icon-btn layui-btn-sm" id="add-btn-orgionRegion" >
                    <i class="layui-icon">&#xe654;</i>新增
                </button>
                {{/if}}
                {{ if hasPower("/region/regionManage:add")}}
                <button class="layui-btn icon-btn layui-btn-sm" id="edit-btn-orgionRegion" >
                    <i class="layui-icon">&#xe642;</i>编辑
                </button>
                {{/if}}
                {{ if hasPower("/region/regionManage:add")}}
                <button class="layui-btn icon-btn layui-btn-sm" id="delete-btn-orgionRegion" >
                    <i class="layui-icon">&#xe640;</i>删除
                </button>
                {{/if}}
                {{ if hasPower("/region/orgion:import")}}
                <button class="layui-btn icon-btn layui-btn-sm" id="import-btn-orgionRegion">
                    <i class="layui-icon">&#xe62f;</i>导入区划树
                </button>
                {{/if}}
            </div>
        </div>
    </div>
  </script>


<!-- js部分 -->
<script type="text/javascript" src="../../assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="../../assets/js/common.js?v=313"></script>
<script src="../../assets/libs/jquery/jquery-3.2.1.min.js"></script>

<!-- easyui部分 -->
<link rel="stylesheet" href="../../assets/libs/easyui/css/easyui.css">
<link rel="stylesheet" href="../../assets/libs/easyui/css/icon.css">
<link rel="stylesheet" href="../../assets/libs/easyui/css/demo.css">
<script src="../../assets/libs/easyui/js/jquery.easyui.min.js"></script>

<!-- Ztree树部分 -->
<link rel="stylesheet" href="../../assets/libs/ztree/css/zTreeStyle/zTreeStyle.css"/>
<script src="../../assets/libs/ztree/js/jquery.ztree.core.min.js"></script>
<script src="../../assets/libs/ztree/js/jquery.ztree.exedit.js"></script>
<script src="../../assets/libs/ztree/js/jquery.ztree.excheck.min.js"></script>
<script src="../../assets/libs/copy/clipboard.min.js"></script>

<script src="../../assets/libs/template-web.js"></script>
<script src="../../assets/libs/axios.min.js"></script>
<script src="../../assets/js/config.js"></script>
<script src="../../assets/js/authority.js"></script>

<script src="../../assets/js/config/region.js"></script>
<script src="../../assets/js/region/orgion.js"></script>
</body>

</html>